package com.duoqin.payservice.data.remote;

import com.duoqin.common.data.DefaultResponse;
import com.duoqin.payservice.data.AccountResponse;
import com.duoqin.payservice.data.CommoditiesResponse;
import com.duoqin.payservice.data.CommodityResponse;
import com.duoqin.payservice.data.ExpenseRequest;
import com.duoqin.payservice.data.ExpenseResponse;
import com.duoqin.payservice.data.ExpenseSummaryResponse;
import com.duoqin.payservice.data.HistoryResponse;
import com.duoqin.payservice.data.RechargeHistoryResponse;
import com.duoqin.payservice.data.RechargeRequest;
import com.duoqin.payservice.data.RechargeResponse;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface PayApiInterface {
    @GET("pay/commodities")
    Call<CommoditiesResponse> getCommodities();

    @GET("pay/commodity/{id}")
    Call<CommodityResponse> getCommodity(@Header("Authorization") String authorization,
                                         @Path("id") String id);

    @POST("pay/expense")
    Call<ExpenseResponse> expense(@Header("Authorization") String authorization,
                                  @Body ExpenseRequest expenseRequest);

    @POST("pay/recharge")
    Call<RechargeResponse> recharge(@Header("Authorization") String authorization,
                                    @Body RechargeRequest rechargeRequest);

    @GET("pay/order/{id}")
    Call<DefaultResponse> getOrder(@Header("Authorization") String authorization,
                                   @Path("id") String id);

    @GET("pay/account/{id}")
    Call<AccountResponse> getPayAccount(@Header("Authorization") String authorization,
                                     @Path("id") String id);

    @GET("pay/account")
    Call<AccountResponse> getPayAccounts(@Header("Authorization") String authorization);

    @GET("pay/history")
    Call<HistoryResponse> getHistory(@Header("Authorization") String authorization,
                                     @Query("size") int size);

    @GET("pay/rechargeHistory ")
    Call<RechargeHistoryResponse> getRechargeHistory(@Header("Authorization") String authorization);

    @GET("pay/expenseSummary ")
    Call<ExpenseSummaryResponse> getExpenseSummary(@Header("Authorization") String authorization);
}
